package com.starview.star.compiler.operator;

import com.starview.star.compiler.ast.IAttribute;
import com.starview.star.compiler.util.PrettyPrintDisplay;

@SuppressWarnings("serial")
public class OpFormAttribute implements IAttribute
{
  public static final String name = "OperatorFormAttribute";

  private final int priority;
  private final OperatorForm form;

  public OpFormAttribute(int priority, OperatorForm form)
  {
    this.priority = priority;
    this.form = form;
  }

  @Override
  public boolean isIheritable()
  {
    return false;
  }

  public int getPriority()
  {
    return priority;
  }

  public OperatorForm getForm()
  {
    return form;
  }

  @Override
  public void prettyPrint(PrettyPrintDisplay disp)
  {
    disp.append(priority);
    disp.append(":");
    disp.append(form.toString());

  }
}
